package com.qf.homework;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class InputTxt {
    public static void main(String[] args) {
        BufferedWriter writer = null;
        String s = null;
        try {
            writer = new BufferedWriter(new FileWriter("E:\\ideademo\\qf\\mybaties\\homework01\\src\\main\\resources\\a.txt"));
            for (int i = 0; i < 500000; i++) {
                s = "书名" + i + ",作者" + i + ",出版社" + i + "," + (int) (Math.random() * 5);
                writer.write(s);
                writer.newLine();
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

}}